# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sdl2_mixer
pkgver=2.6.3
pkgrel=1
pkgdesc="A simple multi-channel audio mixer"
url="https://github.com/libsdl-org/SDL_mixer"
arch="all"
license="Zlib"
makedepends="
	cmake
	flac-dev
	fluidsynth-dev
	libmikmod-dev
	libmodplug-dev
	libvorbis-dev
	linux-headers
	mpg123-dev
	opusfile-dev
	samurai
	sdl2-dev
	"
subpackages="$pkgname-dev $pkgname-doc"
options="!check" # no test suite
source="$pkgname-$pkgver.tar.gz::https://github.com/libsdl-org/SDL_mixer/archive/refs/tags/release-$pkgver.tar.gz
	vfork-check.patch
	"
builddir="$srcdir/SDL_mixer-release-$pkgver"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
74c2b449e8a9928679d42e25bd7a5967e41fe9d51732f26197c6bbe1db9170be784125b7f268476050017f3dc970497e09a0409d50731026a18355375d0369ce  sdl2_mixer-2.6.3.tar.gz
f2a23937d4508e7aa91cc96abd8126180537723e5fd017a88f0299649676a193e1f3eb9123a5b9fb6e5d1569bd0854b84834e4db0f5b54c0734baafa2e84c04c  vfork-check.patch
"
